package lt.ntec.danblog.server.core;

import java.util.ArrayList;
import java.util.List;

public class SysException extends Exception {

    /**
     *
     */
    private static final long serialVersionUID = 4380143820335295624L;
    private List<Messageable> messages = new ArrayList<Messageable>();

    public SysException() {
    }

    public SysException(List<Messageable> messages) {
        this.messages = messages;
    }

    public SysException(Messageable message) {
        message.getContent();
        this.messages.add(message);
    }

    public SysException(String message) {
    }

    @Override
    public String getMessage() {
        return messages.toString();
    }

    public List<Messageable> getMessages() {
        return messages;
    }
}
